Page({
  data: {
    url: ''
  },
  onLoad() {
    this.cropper = this.selectComponent("#image-cropper-index");
  },
  open() {
    this.cropper.open()
  },
  onConfirm(e) {
    console.log(e)
    this.setData({
      url: e.detail.url
    })
  }
})